from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com/')
driver.maximize_window()

kw = driver.find_element(By.XPATH, "//*[@id='kw']")
print(kw.get_attribute('outerHTML'))

wd = driver.find_element(By.XPATH, "//*[@name='wd']")
print(wd.get_attribute('outerHTML'))

autocomplete = driver.find_element(By.XPATH, "//input[@autocomplete]")
print(autocomplete.get_attribute('outerHTML'))


driver.quit()
